package com.mcxx.modules.system.service.impl;

import com.mcxx.modules.system.service.IssuingBankService;
import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.filemanage.easypoi.util.ExportExcelService;
import com.mcxx.modules.filemanage.file.service.FileService;
import com.mcxx.modules.miniSalvation.family.dto.OrganizationDTO;
import com.mcxx.modules.system.dto.IssuingBankDTO;
import com.mcxx.modules.system.entity.TaskExportEntity;
import com.mcxx.modules.system.param.IssuingBankParam;
import com.mcxx.modules.system.service.read.IssuingBankReadService;
import com.mcxx.modules.system.service.write.TaskExportWriteService;
import com.yinhai.ta404.component.audit.vo.ExcelInfo;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.service.BaseService;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Slf4j
@Service
@TaTransactional
public class IssuingBankServiceImpl extends BaseService implements IssuingBankService {
    @Autowired
    private ExportExcelService exportExcelService;
    @Autowired
    private FileService fileService;
    @Autowired
    private TaskExportWriteService taskExportWriteService;
    @Autowired
    private IssuingBankReadService issuingBankReadService;


    @Override
    public ExcelInfo exportIssuingBankList(IssuingBankParam param, UserAccountVo accountVo) {

        QueryParamUtil.setBaseParamValue(param, accountVo);


        List<IssuingBankDTO> list = issuingBankReadService.exportIssuingBankList(param);


        ExcelInfo excelInfo = exportExcelService.exportOrgOpLogs(IssuingBankDTO.class,list,"代发银行信息.xls",
                "代发银行信息","代发银行信息",false,null);



        return excelInfo;
    }
}
